QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Mesh Edges

Labels

ASCII
MeshEdges
Binary
edge ( = 0x65646765 )

Mesh Edge Data Type

Uns32               vertexIndex1
Uns32               vertexIndex2
vertexIndex1
The smaller of the indices of the two vertices of the mesh edge. The indices are taken from the vertex index of the parent mesh.
vertexIndex2
The larger of the indices of the two vertices of the mesh edge.

The edge defined by a mesh edge data type must be an edge of a face (not merely a contour) of the parent mesh.

Data format

Uns32               nEdges
MeshEdge            edges[nEdges]
nEdges
The number of edges of the parent mesh treated by this mesh edge object. The value in this field must be greater than 0 and less than or equal to the number of edges of faces of the parent mesh.
edges[]
An array of mesh edge data types. The elements of this array are correlated with attribute sets that occur as child objects of the mesh edges object. The number of fields of this array must equal the value of nEdges .

Data Size

4 + sizeof(edges[0...nEdges-1])

Description

The mesh edges object is used to attach attribute sets separately and selectively to one or more edges of faces of a mesh.

Parent Hierarchy

Data.

Parent Objects

Mesh (always).

Child Objects

Attribute sets (always). The number of child objects is equal to the value of the nEdges field. Child objects are correlated with elements of the array edges[] in the order of their occurrence in the specification of the mesh edges object and its child objects; that is, the i th child object is correlated with the i th element of the array edges[] .

Example

Container (
    Mesh ( ... )
    Container (
        MeshEdges (
        2                                   # numEdges
        0 1                                 # first edge
        1 3                                 # second edge
    )
        Container (                         # first edge attribute set
            AttributeSet ( )
            DiffuseColor ( 0.2 0.8 0.3 )
        )
        Container (                         # second edge attribute set
            AttributeSet ( )
            DiffuseColor ( 0.8 0.2 0.3 )
        )
    )
)

© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |